#ifndef _Grv98Pdf_H_
#define _Grv98Pdf_H_

//
// Grv98Pdf.h
//
// Created by TB on 11/23/11.
// Copyright 2011 BNL. All rights reserved.
//

#include "tppmc/parameters.h" // PARTONCONTENT
#include "tppmc/PartonContent.h"
#include "tppmc/PartonDistribution.h"

namespace tppmc {
   
   /**
    If LHAPDF support is present, this is equivalent to:
    <ul>
    <li>Set 80050 member 0 : Leading order</li>
    <li>Set 80051 member 0 : Next-to-leading order MSbar</li>
    <li>Set 80051 member 1 : Next-to-leading order DIS</li>
    </ul>
    \todo investigate small discrepancy between results using this version and
    GRV98 accessed via LHAPDF.
    \todo We don't actually have the grids for nlo (msbar or dis) in the
    distribution!
   */
   class Grv98Pdf : public PartonDistribution {
      
   public:
      
      /**
       Valid sets for GRV98.
       */
      enum Set {
         LO = 1, NLO_MSBAR = 2, NLO_DIS = 3
      };
      
      /**
       Constructor.
       Valid values for set are:
       <ol>
       <li>Leading order</li>
       <li>Next-to-leading order (MSbar scheme)</li>
       <li>Next-to-leading order (DIS scheme)</li>
       </ol>
       Passing an invalid set will cause the constructor to throw
       an instance of std::invalid_argument.
       */
      Grv98Pdf(int set = 1);

      /**
       Destructor.
       */
      virtual ~Grv98Pdf() { }

      /**
       Evaluate the distribution for a parton at a given scale.
       virtual double Evaluate(const pythpart&, double scale) const = 0;
       */
      virtual void Evaluate(const pythpart&, double scale,
                            PartonContent&) const;

      virtual void Evaluate(const pythpart&, double scale,
                            PARTONCONTENT&) const;

      /**
       Returns true if the distribution of the input parton type
       is supported by this function.
       */
      virtual bool Supports(const pythpart&) const;
      
      virtual std::string Name() const;
      
   protected:
      
      int mSet;
      
      ClassDef(tppmc::Grv98Pdf, 1)
   };
   
} // namespace tppmc

#endif
